package online.foxnull2.foxmall.order.vo.orderConfirm;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
@Accessors(chain = true)
public class CartItem implements Serializable {

    private Long skuId;
    private String title;
    private String defaultImg;
    private List<String> skuSaleAttr;
    private BigDecimal price;
    private Integer count;
    private Boolean hasStock = true;
    private BigDecimal weight = new BigDecimal("0.000");
//    private BigDecimal totalPrice;

    public BigDecimal getTotalPrice() {
        return getPrice().multiply(new BigDecimal(getCount().toString()));
    }
}
